package com.yezi.lampcourt.http;

import com.yezi.lampcourt.base.BaseEntity;
import com.yezi.lampcourt.entity.AppBean;
import com.yezi.lampcourt.entity.CourtBean;
import com.yezi.lampcourt.entity.ExecuteResultLampBean;
import com.yezi.lampcourt.entity.LampBean;
import com.yezi.lampcourt.entity.ModeBean;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by Administrator on 2017/9/19 0019.
 */

public interface LampCourtService {

    @FormUrlEncoded
    @POST("app/api")
    Observable<BaseEntity<AppBean>> getDetail(@Field("iccid") String iccid);

    @POST("gateway?type=gateJzqAndKzq")
    Observable<BaseEntity<List<CourtBean>>> getCourtList();

    @POST("gateway?type=gateModeList")
    Observable<BaseEntity<List<ModeBean>>> getModeList();

    @FormUrlEncoded
    @POST("gateway?type=gatekzqByjzq")
    Observable<BaseEntity<List<LampBean>>> getLampListByCourt(@Field("jzq") String id);

    @FormUrlEncoded
    @POST("gateway?type=gateModeByApp")
    Observable<BaseEntity<List<ExecuteResultLampBean>>> executeMode(@Field("jzqId") String jzqId, @Field("modeId") String modeId);


}
